package com.aaa.check.controller.api;


import com.aaa.check.service.CheckListService;
import com.aaa.check.service.CheckResultService;
import com.aaa.check.vo.CheckListVo;
import com.aaa.check.vo.CheckResultVo;
import com.aaa.check.vo.UrlVo;
import com.aaa.entity.CheckResult;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("check/api/listt")
public class ApiCheckResultController {
    @Autowired
    private CheckResultService checkResultService;
    @PostMapping("searchUu/{currentPage}/{pageSize}")
    public Result<IPage<CheckResult>> searchUser(
            @PathVariable Integer currentPage,
            @PathVariable Integer pageSize,
            @RequestBody CheckResultVo checkResultVo
    ){
        return checkResultService.findByConditionn(currentPage,pageSize,checkResultVo);
    }
//检查结果录入
    @PostMapping("addMsg/{cocId}/{textarea}")
    public Result<Boolean> searchUser(
            @PathVariable String cocId ,
            @PathVariable String textarea,
            @RequestBody UrlVo urlVo
    ){
        return checkResultService.uptResult(cocId,textarea,urlVo);
    }




}
